$(function(){
	$(".weibo_button a:contains('收藏')").live('click',function(){
		var weiboId = $(this).parent(".weibo_button").prevAll("#weibo_id").text();
		if(!weiboId){
			return false;
		}
		else{
			$.ajax({
				type: "POST",
				url: "php_ajax/collection_info.php",
				dataType: "html",
				cache: "false",
				data: {w_id: weiboId},
				success: function(data){
					if(data){
						alert("收藏成功！");
					}
					else{
						alert("您已收藏该微博！");
					}
				}
			});
		}
	}); 
});